home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / Ex_INV.dxr / 00026.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  906 b   |  25 lines

  1. on enterFrame
  2.   global x, y, r, theta, AnsW
  3.   set the floatPrecision to 5
  4.   set y to random(200) + 3
  5.   set x to integer(200) + 3
  6.   set temp to float(y) / float(x)
  7.   set theta to float(atan(float(y) / float(x)))
  8.   set AnsW to float(cos(theta))
  9.   set the floatPrecision to 3
  10.   put temp & " ))" into field "Question"
  11.   put theta & " )" into field "Theta2"
  12.   set the floatPrecision to 2
  13.   put temp & ")=" & theta & " rad. =" & theta * 180.0 / PI & " deg." into field "Theta1"
  14.   put AnsW into field "Answer2"
  15.   put " " into field "Answer"
  16.   set the textSize of field "Answer" to 32
  17.   set the textSize of field "Answer2" to 32
  18.   set the textSize of field "Theta" to 32
  19.   set the textSize of field "Question" to 32
  20.   set the textStyle of field "Answer" to "bold"
  21.   set the textStyle of field "Answer2" to "bold"
  22.   set the textStyle of field "Question" to "bold"
  23.   set the textStyle of field "Theta" to "bold"
  24. end
  25.